@extends('admin::metro.vendor.master')

@section('title')
    {{ trans('settings.settings') }}
@stop

@section('content')

<div class="box">
    <div class="box-header">
        <h2><i class="halflings-icon th"></i><span class="break"></span>{{ trans('settings.settings') }}</h2>
    </div>
    <div class="box-content">
        <ul class="nav tab-menu nav-tabs" id="myTab">
            <li><a href="#sitename">{{ trans('settings.sitename') }}</a></li>
            <li><a href="#favicon">{{ trans('settings.favicon') }}</a></li>
            <li><a href="#locales">{{ trans('settings.locales') }}</a></li>
            <li><a href="#fallback-locale">{{ trans('settings.fallback_locale') }}</a></li>
            <li><a href="#contacts">{{ trans('settings.contacts') }}</a></li>
            <li><a href="#avatars">{{ trans('settings.avatars') }}</a></li>
        </ul>

        <div id="tabContent" class="tab-content">
            <div class="tab-pane" id="sitename">
                @include('admin::metro.settings.sitename_form')
            </div>
            <div class="tab-pane" id="favicon">
                @include('admin::metro.settings.favicon_form')
            </div>
            <div class="tab-pane" id="locales">
                @include('admin::metro.settings.locales_form')
            </div>
            <div class="tab-pane" id="fallback-locale">
                @include('admin::metro.settings.fallback_locale_form')
            </div>
            <div class="tab-pane" id="contacts">
                @include('admin::metro.settings.contacts_form')
            </div>
            <div class="tab-pane" id="avatars">
                @include('admin::metro.settings.avatars_form')
            </div>
        </div>
    </div>
</div>

@stop

@section('javascripts')
    <script>
        $(document).ready(function () {
            var settings_tab = "{{ $settings_tab or 'sitename' }}";
            if (settings_tab) {
                $('a[href="#' + settings_tab + '"]').parent().addClass('active');
                $('div#' + settings_tab).addClass('in');
                $('div#' + settings_tab).addClass('active');
            }
        });
    </script>
@stop